/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package simulation2;
import java.util.ArrayList;
import simulation2.Dice;

/**
 *
 * @author ec291204
 */
public class FakeDice extends Dice
{
    private ArrayList<Integer> listDices;
    private int indice;
    
    public FakeDice(int[] diceValues)
    {
        indice =0;
        listDices = new ArrayList<Integer>();
        for( int value : diceValues )
        {
            listDices.add(new Integer(value));
        }
    }
    
    @Override
    public int getLastResult() 
    {
        if(indice <= 2)
        {
           int indice =listDices.get(this.indice);
           indice++;
          
        }
        else
        {
           int indice =listDices.get(3);      
        }
        return indice;
       
    }
    
    public void addValueToDice(int ValueDice)
    {
        listDices.add(ValueDice);
    }
     
}
